/*
 * @Author: tom
 * @Date: 2022-08-29 14:44:12
 * @LastEditors: 阿航
 * @LastEditTime: 2022-10-28 14:32:28
 * @FilePath: \shop\src\main.js
 */
import {createApp} from 'vue'
// import './style.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from './router/index'
import App from './App.vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// import {useRouter} from "vue-router";

import {createPinia} from 'pinia' // 引入pinia
import Pagination from '@/components/Pagination/index.vue'
const app = createApp(App)

const pinia = createPinia()
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

// const router = useRouter();
// const whiteList = [""]
// router.beforeEach(to,from,next){
//   const token =

// }

app
  .component('Pagination', Pagination)
  .use(ElementPlus)
  .use(router)
  .use(pinia)
  .mount('#app')
